<?php
require_once("lib/db_connection.php");
$query_driver = "SELECT lname,fname,autoid FROM employee_tbl WHERE job_title='Driver' AND company_id='".$_SESSION['company_id']."'";
$result_driver = mysql_query($query_driver) or die("SELECT DRIVER ".mysql_error());

$arr_string = "";
while($row_driver = mysql_fetch_array($result_driver))
{
 $name = $row_driver['lname'].", ".$row_driver['fname'];
 $id = $row_driver['autoid'];
 
 $arr_string .= "new Array('".$name."','".$id."'),";
}
$arr_string = substr($arr_string,0,-1);
echo "new Array($arr_string)";
?>
